@set enc=1
@set enckey=0000000000000000
@echo off
perl .\util\hex2mif.pl < .\Debug\Exe\app.hex ram > .\output\fwram.rom
copy .\output\fwram.rom ..\BT\output\fwram.rom

copy .\src\bt_config\ramcode.rom .\output\
copy .\src\bt_config\memmap.format .\output\
copy  .\src\bt_config\patch.dat + .\src\bt_config\bluetooth.dat + .\src\bt_config\sdk.dat +  .\src\bt_config\att_db.dat +   .\src\bt_config\revd.dat .\output\sched.rom


cd .\output
..\util\geneep ramcode.rom fwram.rom sched.rom 0 %enckey% c

echo eeprom.dat Generated........

@rem perl eeprom2flash.pl
cd ..

echo **********************************
echo EEPROM Generated.
echo The Device is %device_option%. 
echo Start to download EEPROM image...
@e pu
@e ep 
echo Downloading was finished.
@e ku
echo The chip has been reset.
echo **********************************
goto end

:end